cmake_minimum_required(VERSION 3.7)
project(mbedtls_demo_complete)

set(CMAKE_C_STANDARD 99)

set(SOURCE_FILES main.c util.h util.c)
add_executable(mbedtls_demo_complete ${SOURCE_FILES})
add_executable(chacha20_demo chacha20_demo.c util.h util.c)
add_executable(sha256_demo sha256_demo.c util.h util.c)
add_executable(ecc_key_gen ecc_key_gen.c util.h util.c)
add_executable(ecc_key_gen_der ecc_key_gen_der.c util.h util.c)
add_executable(ecdsa_demo ecdsa_demo.c util.h util.c)
add_executable(aes_ecb_256_demo aes_ecb_256_demo.c util.h util.c)
add_executable(hmac_sha256_demo hmac_sha256_demo.c util.h util.c)
add_executable(ecdh_demo ecdh_demo.c util.h util.c)
target_link_libraries(chacha20_demo mbedcrypto)
target_link_libraries(sha256_demo mbedcrypto)
target_link_libraries(ecc_key_gen mbedcrypto)
target_link_libraries(ecdsa_demo mbedcrypto)
target_link_libraries(aes_ecb_256_demo mbedcrypto)
target_link_libraries(hmac_sha256_demo mbedcrypto)
target_link_libraries(ecdh_demo mbedcrypto)
target_link_libraries(ecc_key_gen_der mbedcrypto)